import requests

url = "https://api.siliconflow.cn/v1/embeddings"

payload = {
    "input": "今天天气很好",
    "encoding_format": "float",
    "model": "BAAI/bge-large-zh-v1.5"
}
headers = {
    "Authorization": "Bearer sk-pusgnznrckhdogxrchddbfzrypvljzjdydjogvnfbprehtkj",
    "Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

# 检查请求是否成功
if response.status_code == 200:
    
    print(response.text)
else:
    print(f"请求失败，状态码: {response.status_code}")
    print(f"错误信息: {response.text}")
